package com.kust.smarthome.web.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author iAuzre
 * @since 2021-06-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("detector")
@ApiModel("烟雾报警器")
public class Detector implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id")
    @ApiModelProperty(value = "id", required = true)
    private Integer id;

    @TableField("state")
    @ApiModelProperty(value = "对应状态, 1为开 2为关", required = true)
    private Integer state;

    @TableField("url")
    private String url;

    @TableField("content")
    @ApiModelProperty(value = "描述", required = true)
    private String content;

    @TableField("created")
    @ApiModelProperty(value = "创建时间", required = true)
    private LocalDateTime created;

    @TableField("user_id")
    @ApiModelProperty(value = "对应用户id", required = true)
    private Integer userId;

    @TableField("room_id")
    @ApiModelProperty(value = "房间id")
    private Integer roomId;

    @TableField("name")
    @ApiModelProperty(value = "设备备注名")
    private String name;

}
